﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading;

namespace IRCBot
{
    public partial class ConsoleLog : Form
    {

        Thread gpT;

        TcpClient gpClient;
        NetworkStream gpStream;
        StreamReader gpInput;
        StreamWriter gpOutput;

        void StartCombatParse(string server, int port)
        {
            Log("Opening connection to Glider");
            gpClient = new TcpClient(server, port);
            if (gpClient.Connected)
            {
                Log("Connected to Glider");
                gpT = new Thread(new ThreadStart(CombatHandler));
                gpT.Start();
            }
        }

        void CombatHandler()
        {
            gpStream = gcClient.GetStream();
            gpOutput = new StreamWriter(gcStream);
            gpInput = new StreamReader(gcStream);
            gpOutput.WriteLine(gPass);
            gpOutput.Flush();

            while (gpClient.Connected)
            {
            }
        }
    }
}